← Back

SAF Exercise Wallaby Manpower Bot

BackendNext.jsTypescriptSQLite
Published:


About this Project

This project was developed for the Singapore Armed Forces’ Exercise Wallaby Manpower Office 2025 in Austraila, Rockhampton.

It automates the tedious process of tracking personnel movements daily and enables authorized users to submit meal claims with receipt.

The backend of this Telegram bot was built using TypeScript, Express.js, Prisma.js, SQLite and ngrok (used as a public tunnel to expose the local server).

All data shown are simulated for demonstration purposes.

Authentication

To prevent personnel from spoofing another user’s identity when submitting their parade state, each user must register with their NRIC and phone number upon enrollment.

These details are then validated against the existing database to ensure authenticity.

View of the Authentication feature

Submission of Parade States

At 0700 hrs daily, the bot automatically sends out a parade state prompt to all personnel whose arrival and departure dates fall within the exercise period in Australia. Each user is given two attempts to submit their status.

If a user fails to submit their parade state within the given timeframe, the bot will send reminder messages periodically until 0800 hrs, after which they are automatically marked as “did not submit parade state”.

View of the Parade State prompt feature

Summarization of Parade States to Unit & Subunit ICs

After 0800 hrs, all Unit and Subunit ICs will receive a summarized parade state report of the personnel under their charge.

  1. Unit ICs → View a summarized overview of all subunit personnel statuses.
  2. Subunit ICs → View both summarized and detailed reports of their respective subunit personnel, including those who did not submit their parade state.

A user can hold both roles simultaneously.

View of the Parade State summary feature

Personnel who fall under point 1 will also receive a summary graph showing the status distribution across each subunit.

Image cropped to shorten display length

View of the Parade State summary graph feature

Missed Meal Claims

At 2000 hrs, the bot automatically prompts eligible personnel to submit any missed meal claims. A reminder message is also sent at 2200 hrs for those who have not yet submitted.

View of the missed meal feature

Other Features

The bot also includes additional features such as:

  1. Feedback Submission — Allows users to provide feedback directly through the bot.
  2. Afternoon Parade State Prompt — Sends a prompt in the afternoon to update parade state.
  3. On-Demand Parade State Summary Graph — Generates real-time summary graphs upon request.
  4. Birthday Wishes — Automatically sends birthday greetings to personnel.
  5. User Rights Overview — Enables users to view their assigned permissions and access levels.

View of some other features